﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Registration : System.Web.UI.Page
{
    string username = "";
    string password = "";
    string name = "";
    string Email= "";
    long mobile = 0;
    string accountno = "";
    string bankname = "";
    string address = "";

    string usertype = "";

    BusinessLogic obj_businesslogic = new BusinessLogic();

    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        username=txtUsernamereg.Text.ToString();
        password=txtpasswordreg.Text.ToString();
        name=txtname.Text.ToString();
        Email=txtEmailid.Text.ToString();
        mobile= Convert.ToInt64(txtMobileno.Text.ToString());
        accountno=txtAcountno.Text.ToString();
        bankname=txtBankname.Text.ToString();
        address = txtAddress.Text.ToString();
        if(rbtCustomer.Checked==true)
        {
            usertype = "customer";

        }
        else if(rbtVendor.Checked==true)
        {
            usertype="vendor";
          }

        else if(rbtCustomer.Checked==true && rbtVendor.Checked==true)
        {
             usertype="both";
        }



        if(obj_businesslogic.submitdetails(username, password,name,Email,mobile,accountno,bankname ,usertype,address,ddlSecurityques.Text.ToString(),txtSecurityans.Text.ToString()))
        {
            LblRegistration.Text = "Registration sucessful";

        }

    }
    protected void btnworks_Click(object sender, EventArgs e)
    {
        Response.Redirect("siteworking.aspx");
    }
}